var casper = require('casper').create();

casper.start('http://domain.tld/page.html', function () {
    this.test.assertExists({
        type: 'xpath',
        path: '//*[@class="plop"]'
    }, 'the element exists');
});

function Cow() {
    this.mowed = false;
    this.moo = function () {
        this.mowed = true;
        return 'moo!';
    }
}

casper.test.begin('Cow can moo', 2, function suite(test) {
    var cow = new Cow();
    test.assertEquals(cow.moo(), 'moo!');
    test.assert(cow.mowed);
    test.done();
})





